CREATE table "EMPLOYEE_LEAVE_DETAIL" (
    "EL_ID"            NUMBER NOT NULL,
    "EL_LEAVE_NAME"    VARCHAR2(4000) NOT NULL,
    "EL_EMP_ID"        NUMBER NOT NULL,
    "EL_DATE_OF_LEAVE" DATE NOT NULL,
    "EL_LEAVE_STATUS"  NUMBER NOT NULL,
    constraint  "EMPLOYEE_LEAVE_DETAIL_PK" primary key ("EL_ID")
)
/

CREATE sequence "EMPLOYEE_LEAVE_DETAIL_SEQ" 
/

CREATE trigger "BI_EMPLOYEE_LEAVE_DETAIL"  
  before insert on "EMPLOYEE_LEAVE_DETAIL"              
  for each row 
begin  
    select "EMPLOYEE_LEAVE_DETAIL_SEQ".nextval into :NEW.EL_ID from dual;
end;
/   

